//
//  UIGestureRecognizer+Extension.h
//  Tools
//
//  Created by xlz on 2018/5/12.
//  Copyright © 2018年 com.365hy. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "UIControl+Extension.h"
/**
 * gesture事件Block
 *
 */
typedef void(^WDGestureBlock)(UIGestureRecognizer *gesture);


/**
 * Tap点击事件Block
 *
 */
typedef void(^WDTapGestureBlock)(UITapGestureRecognizer *gesture);

/**
 * Tap长按事件Block
 *
 */
typedef void(^WDLongGestureBlock)(UILongPressGestureRecognizer *gesture);

@interface UIGestureRecognizer (Extension)

/**
 *
 *    Make all gestures support block callback.
 *  This will support all kinds of gestures.
 */
@property (nonatomic, copy) WDGestureBlock wd_onGesture;

/**
 *
 *    Make tap gesture support block callback.
 */
@property (nonatomic, copy) WDTapGestureBlock wd_onTaped;

/**
 *
 *    Make long press gesture support block callback.
 */
@property (nonatomic, copy) WDLongGestureBlock wd_onLongPressed;

+ (UITapGestureRecognizer *)wd_initWithTarget:(id)target action:(WDTapGestureBlock)action;

@end
